package com.hotel.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ht_check_out
 */
@TableName(value ="ht_check_out")
@Data
public class HtCheckOut implements Serializable {
    /**
     * 入住单号
     */
    @TableId(type = IdType.INPUT)
    private String checkInNo;

    /**
     * 客房编号
     */
    private Long roomNo;

    /**
     * 房价，入住登记时的折后价
     */
    private Double housePrice;

    /**
     * 押金
     */
    private Double cashPledge;

    /**
     * 住宿天数
     */
    private Integer stayDays;

    /**
     * 住宿费
     */
    private Double stayCost;

    /**
     * 店内消费，如有附加消费，自动计算出
     */
    private Double storeSpending;

    /**
     * 餐费
     */
    private Double meals;

    /**
     * 电话费
     */
    private Double phoneBill;

    /**
     * 实际应收
     */
    private Double actualReceivables;

    /**
     * 应退押金
     */
    private Double refundableCash;

    /**
     * 付款方式，现金、支票、信用卡、代金券、其他
     */
    private String paymentWay;

    /**
     * 实收
     */
    private Double paidIn;

    /**
     * 找零
     */
    private Double makeChange;

    /**
     * 操作员
     */
    private String operator;

    /**
     * 备注
     */
    private String checkOutRemark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HtCheckOut other = (HtCheckOut) that;
        return (this.getCheckInNo() == null ? other.getCheckInNo() == null : this.getCheckInNo().equals(other.getCheckInNo()))
            && (this.getRoomNo() == null ? other.getRoomNo() == null : this.getRoomNo().equals(other.getRoomNo()))
            && (this.getHousePrice() == null ? other.getHousePrice() == null : this.getHousePrice().equals(other.getHousePrice()))
            && (this.getCashPledge() == null ? other.getCashPledge() == null : this.getCashPledge().equals(other.getCashPledge()))
            && (this.getStayDays() == null ? other.getStayDays() == null : this.getStayDays().equals(other.getStayDays()))
            && (this.getStayCost() == null ? other.getStayCost() == null : this.getStayCost().equals(other.getStayCost()))
            && (this.getStoreSpending() == null ? other.getStoreSpending() == null : this.getStoreSpending().equals(other.getStoreSpending()))
            && (this.getMeals() == null ? other.getMeals() == null : this.getMeals().equals(other.getMeals()))
            && (this.getPhoneBill() == null ? other.getPhoneBill() == null : this.getPhoneBill().equals(other.getPhoneBill()))
            && (this.getActualReceivables() == null ? other.getActualReceivables() == null : this.getActualReceivables().equals(other.getActualReceivables()))
            && (this.getRefundableCash() == null ? other.getRefundableCash() == null : this.getRefundableCash().equals(other.getRefundableCash()))
            && (this.getPaymentWay() == null ? other.getPaymentWay() == null : this.getPaymentWay().equals(other.getPaymentWay()))
            && (this.getPaidIn() == null ? other.getPaidIn() == null : this.getPaidIn().equals(other.getPaidIn()))
            && (this.getMakeChange() == null ? other.getMakeChange() == null : this.getMakeChange().equals(other.getMakeChange()))
            && (this.getOperator() == null ? other.getOperator() == null : this.getOperator().equals(other.getOperator()))
            && (this.getCheckOutRemark() == null ? other.getCheckOutRemark() == null : this.getCheckOutRemark().equals(other.getCheckOutRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCheckInNo() == null) ? 0 : getCheckInNo().hashCode());
        result = prime * result + ((getRoomNo() == null) ? 0 : getRoomNo().hashCode());
        result = prime * result + ((getHousePrice() == null) ? 0 : getHousePrice().hashCode());
        result = prime * result + ((getCashPledge() == null) ? 0 : getCashPledge().hashCode());
        result = prime * result + ((getStayDays() == null) ? 0 : getStayDays().hashCode());
        result = prime * result + ((getStayCost() == null) ? 0 : getStayCost().hashCode());
        result = prime * result + ((getStoreSpending() == null) ? 0 : getStoreSpending().hashCode());
        result = prime * result + ((getMeals() == null) ? 0 : getMeals().hashCode());
        result = prime * result + ((getPhoneBill() == null) ? 0 : getPhoneBill().hashCode());
        result = prime * result + ((getActualReceivables() == null) ? 0 : getActualReceivables().hashCode());
        result = prime * result + ((getRefundableCash() == null) ? 0 : getRefundableCash().hashCode());
        result = prime * result + ((getPaymentWay() == null) ? 0 : getPaymentWay().hashCode());
        result = prime * result + ((getPaidIn() == null) ? 0 : getPaidIn().hashCode());
        result = prime * result + ((getMakeChange() == null) ? 0 : getMakeChange().hashCode());
        result = prime * result + ((getOperator() == null) ? 0 : getOperator().hashCode());
        result = prime * result + ((getCheckOutRemark() == null) ? 0 : getCheckOutRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", checkInNo=").append(checkInNo);
        sb.append(", roomNo=").append(roomNo);
        sb.append(", housePrice=").append(housePrice);
        sb.append(", cashPledge=").append(cashPledge);
        sb.append(", stayDays=").append(stayDays);
        sb.append(", stayCost=").append(stayCost);
        sb.append(", storeSpending=").append(storeSpending);
        sb.append(", meals=").append(meals);
        sb.append(", phoneBill=").append(phoneBill);
        sb.append(", actualReceivables=").append(actualReceivables);
        sb.append(", refundableCash=").append(refundableCash);
        sb.append(", paymentWay=").append(paymentWay);
        sb.append(", paidIn=").append(paidIn);
        sb.append(", makeChange=").append(makeChange);
        sb.append(", operator=").append(operator);
        sb.append(", checkOutRemark=").append(checkOutRemark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}